<!DOCTYPE html>
<html lang="en">
<script src="./static/js/jquery-2.1.4.min.js" type="text/javascript"></script>
<head>
    <meta charset="UTF-8">
    <title>Mysql 示例</title>
</head>
<body>
    <div class="container">
        <table style="height:400px;margin-bottom: 0px;" class="table table-bordered">
            <thead>
            <tr>
                <th>序号</th>
                <th>表名</th>
            </tr>
            </thead>
            <tbody id="t_body">

            </tbody>
        </table>
    </div>
</body>
</html>

<script>
    $.ajax({
        type: "get",
        async: true,
        url: "dbinfo/list-tables",
        dataType: "json",
        success: function (data) {
            console.log(data);
            var str = "";
            for (var i = 0; i < data.data.length; i++) {
                str += "<tr>" +
                    "<td>" + i + "</td>" +
                    "<td>" + data.data[i] + "</td>" +
                    "</tr>";
            }
            console.log(str);
            $("#t_body").append(str);
        },
        error: function (data) {
            console.log(data)
        }
    });
</script>